<?php

function smarty_function_widgetListView($params, &$smarty)
{
    $listViewParam = array(
            'dataProvider'  => $params['dataProvider'],
            'itemView'      => $params['itemView'],
            'beforeAjaxUpdate'=>$params['beforeAjaxUpdate'],
            'afterAjaxUpdate'=>$params['afterAjaxUpdate'],
    );
    if (isset($params['id']))
    {
        $listViewParam['id'] = $params['id'];
    }
    
    Yii::app()->controller->widget('zii.widgets.CListView', $listViewParam);
}